package com.ciklum.robotester.model;

import javax.xml.bind.annotation.XmlElement;
import java.util.Date;

/**
 * Created by miy on 7/7/2014.
 */
public class TestCase {
    @XmlElement
    private String name;
    @XmlElement
    private String sourceCode;


    public TestCase() {
    }

    public TestCase(String name) {
        this.name = name;
    }

    public TestCase(String name, String sourceCode) {
        this.name = name;
        this.sourceCode = sourceCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSourceCode() {
        return sourceCode;
    }

    public void setSourceCode(String sourceCode) {
        this.sourceCode = sourceCode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TestCase testCase = (TestCase) o;

        if (!name.equals(testCase.name)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return name.hashCode();
    }
}
